GXPrintingAlert
You can use theGXPrintingAlert
function to create and display a printing alert box. This function creates the alert box from its parameters. TheGXGetPrintingAlert
function, which is described in the previous section, displays a printing alert box that is created from a resource definition.
OSErr GXPrintingAlert (short iconId, short txtSize, short defaultTitleNum, short cancelTitleNum, short textLength, Ptr pAlertMsg, StringPtr actionTitle, StringPtr title2, StringPtr title3, StringPtr msgFont, ModalFilterProcPtr filterProc, short *itemHit, StringPtr alertTitle);
iconId
- The type of icon to display in the printing alert box. Use one of the following constants for the value of this parameter:
noIcon
,stopIcon
,cautionIcon
, ornoteIcon
.txtSize
- The font size of the text to display in the printing alert box. You can use the value
defaultSystemSize
to indicate that the default text size for the system is to be used.defaultTitleNum
- The type of text string to display on the default button. Use one of the following constants as the value of this parameter:
noDefaultTitle
,defaultAction
,defaultTitle2
, ordefaultTitle3
.cancelTitleNum
- The type of text string to display on the Cancel button. Use one of the following constants as the value of this parameter:
noCancelTitle
,cancelAction
,cancelTitle2
, orcancelTitle3
.textLength
- The length of the text string that is to be displayed in the printing
alert box.pAlertMsg
- A pointer to the message text to display in the printing alert box.
actionTitle
- A pointer to the string to display on the action button.
title2
- A pointer to the string to display on button 2.
title3
- A pointer to the string to display on button 3.
msgFont
- A pointer to a string that names the font to use for displaying the text string in the printing alert box.
filterProc
- A pointer to the function to use for filtering events that occur while the alert is displayed.
itemHit
- On return, the ID of the item that was selected by the user to dismiss the alert box.
alertTitle
- The string that is displayed in the title bar of the printing alert box.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
TheGXPrintingAlert
function displays a printing alert box, building it from the parameters that you pass instead of from a printing alert ('plrt'
) resource.User-initiated events that occur while the alert box is displayed are filtered through the function that is specified by the
filterProc
parameter. When the user dismisses the alert box by selecting an item, this function returns in theitemHit
parameter the ID of the item that was selected.Each of the parameters to this function matches a field in the printing alert resource.
RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
The printing alert resource is described in the section "The Printing Alert ('plrt') Resource" beginning on page 6-21 in the chapter "Printing Resources."You can use the
GXGetPrintingAlert
function, which is described on page 5-18, to display a printing alert box that is created from a resource definition.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help